package pso;

public class Sphere extends BlackBoxFunction {

	public Sphere(int dimension) {
		super(new Point(dimension, -100.0), new Point(dimension, 100.0));
	}

	@Override
	protected double evaluateHelper(Point p) {
		double acc = 0;
		for (double x: p.getCoordinates()) {
			acc += x*x;
		}
		return acc;
	}

}
